package com.edusys.service.impl;

import java.util.List;

import com.edusys.dao.impl.CommonDao;
import com.edusys.service.SuperService;

public class CommonService<T> extends CommonDao<T> implements SuperService<T> {

	private CommonDao<T> cDao=null;
	
	public  CommonService(CommonDao<T> cDao) {
		this.cDao=cDao;
	}
	@Override
	public List<T> findAll(T t) {
		return cDao.query(t);
	}

	@Override
	public List<T> queryAll(T t) {
		return findAll(t);
	}

	@Override
	public T findById(T t) {
		return findAll(t).get(0);
	}

	@Override
	public boolean insert(T t) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean modify(T t) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean delete(T t) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int getTotalCount(T t) {
		// TODO Auto-generated method stub
		return 0;
	}

}
